<?php

/**
 * Enf_nin form base class.
 *
 * @package    form
 * @subpackage enf_nin
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseEnf_ninForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'numhistoria' => new sfWidgetFormPropelSelect(array('model' => 'Historia', 'add_empty' => false)),
      'tip_enf'     => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'Enf_nin', 'column' => 'id', 'required' => false)),
      'numhistoria' => new sfValidatorPropelChoice(array('model' => 'Historia', 'column' => 'id')),
      'tip_enf'     => new sfValidatorString(array('max_length' => 30, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('enf_nin[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Enf_nin';
  }


}
